<p class="commentsListTitle">评论列表：</p>
<%if(post.comments.length){%>
<ul class="list commentsList">
<% post.comments.forEach(function (comment) {%>
    <li>
        <dl class="user">
            <dt>
                <a href="/user/<%= comment.user.name %>"><img src="<%=comment.user.face%>" /></a>
            </dt>
            <dd>
                <a href="/user/<%= comment.user.name %>"><%= comment.user.name %></a>
                <span>&emsp;回复于：<%= comment.time %></span>
                <div><%= comment.user.email%></div>
            </dd>
        </dl>
        <div><%- comment.content %></div>
    </li>
<%});%>
</ul>
<%}else{%>
<div class="noData">没有数据。。。</div>
<%}%>
<form method="post" class="commentForm">
    <div class="title">发表评论：</div>
    <%if(user){%>
        姓名：<span><%=user.name%></span><input type="hidden" name="name" value="<%= user.name %>"/><br>
        邮箱：<span><%=user.email%></span><input type="hidden" name="email" value="<%= user.email %>"/><br>
        <br>
        <textarea name="content" cols="80" rows="10"></textarea>
        <br>
        <input type="submit" value="评论"/>
    <%}else{%>
        <p>请先<a href="/login?back=<%=back%>">登录</a>后，再评论</p>
    <%}%>
</form>